import Vue from 'vue'
import Vuex from 'vuex'
import uView from 'uview-ui'
import homepage from './modules/homepage'
import createPersistedstate from 'vuex-persistedstate'
Vue.use(uView)
Vue.use(Vuex)

export default new Vuex.Store({
	module:{
		homepage
	},
	plugins: [createPersistedState({
	  	storage: {
	            getItem: (key) => uni.getStorageSynk(key),
	            setItem: (key, value) => uni.setStorageSync(key,value),
	            removeItem: key => uni.removeStorageSync(key)
	        }
	  })],
})